<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="vue.js"></script>

</head>

<body>
  <div id="app">
    ￥：<input type="text" v-model="rmb">
    <br>
    $：<input type="text" v-model="dollar">

    <p v-show="rmb!='' && dollar!=''">{{rmb}}人民币={{dollar}}美元</p>
    <br>
  </div>

  <script>
    new Vue({
      el: "#app",
      data: {
        rmb: "",
        dollar: ""
      },

      watch: {

        rmb (newValue, oldValue) {
          this.dollar = newValue * 0.1419;
        },

        dollar (newValue, oldValue) {
          this.rmb = newValue / 0.1419;
        }

      }
    })
  </script>
</body>

</html>